package tech.yangzhijie.basic.java05;

public class Java01 {

    public static void main(String[] args) {
        int[] ints = arrayReverse(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9});
        for (int i = 0; i < ints.length; i++) {
            int anInt = ints[i];
            System.out.println(anInt);
        }
    }
    private static int[] arrayReverse(int[] a){
        int[] b = new int[a.length];
        for (int i = 0; i < a.length; i++) {
            b[i] = a[a.length-(i+1)];
        }
        return b;
    }
}
